package com.zrrd.learn.chapter07字符串;

/**
 * PPT19页
 *
 * @author wrn
 * @version 1.0
 * @date 2023/7/17 16:03
 */

public class StringTest01 {

    public static void main(String[] args) {
        String s = "Welcome to Java World!";
        String s1 = "sun java";
        System.out.println(s.startsWith("Welcome"));
        //true
        System.out.println(s.endsWith("World"));
        //false
        String sL = s.toLowerCase();
        String sU = s.toUpperCase();

        System.out.println(sL);
        //welcome to java world!
        System.out.println(sU);
        //WELCOME TO JAVA WORLD!
        String subS = s.substring(11);
        System.out.println(subS);//Java World!
        String sp = s1.trim();
        System.out.println(sp);//sun java



    }

}
